<?php
/* @var $this BannerController */
/* @var $model Banner */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'banner-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>

	<p class="note">Поля с <span class="required">*</span> должны быть заполнены.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model, 'banner_img'); ?>
		<div class="field">
			<?php echo BaseController::material_image($model->banner_id, $model->banner_img, '150', 'banners'); ?>
			<br/>
			<?php echo CHtml::activeFileField($model, 'image'); ?>
		</div>
		<?php echo $form->error($model,'banner_img'); ?>
	</div>

	

	<div class="row">
		<?php echo $form->labelEx($model,'banner_alt'); ?>
		<?php echo $form->textField($model,'banner_alt',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'banner_alt'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'banner_url'); ?>
		<?php echo $form->textField($model,'banner_url',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'banner_url'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'banner_position'); ?>
		<?php echo $form->textField($model,'banner_position',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'banner_position'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->